﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Castle.Windsor;
using HelloWindsor.Interfaces;
using Castle.Windsor.Configuration.Interpreters;
using Castle.Core.Resource;

namespace HelloWindsor
{
    public static class App
    {
        public static void Main()
        {
            IWindsorContainer windsor = new WindsorContainer(
                new XmlInterpreter(new ConfigResource("castle"))
                );

            //windsor.AddComponent("httpServiceWatcher", typeof(HttpServiceWatcher));
            //windsor.AddComponent("form.component", typeof(Form1));
            //windsor.AddComponent("INotifier", typeof(INotifier));

            Form1 form = (Form1)windsor[typeof(Form1)];

            ///HttpServiceWatcher watcher = new HttpServiceWatcher(new ScreenNotifier());
            Application.Run(form);

            windsor.Release(form);
        }
    }
}
